<template>
    <fieldset>
        <legend>个人中心</legend>
        <h1>我的貂蝉在哪里</h1>
        <button @click="heartclick(item)" v-for="(item,i) in lists" :key="i">{{item}}</button>
        
        <router-view></router-view>
    </fieldset>
</template>
<script>
    export default {
       data () {
        return {
            lists:['heart','brain']
        }
       },
        methods: {
            heartclick(item){
           
            if (this.$route.path==='/mine/'+item) {
                        return
             }
                console.log(this.$route);
                console.log(item);
                this.$router.push(`/mine/${item}`)
            }
        }
    }

</script>
<style scoped>
    h1{
        color: rgb(12, 106, 194);
    }
    button{
        color: rgb(205, 20, 112);
        margin-right: 10px;
    }
</style>